package com.dhemery.mack.adapters.tests;

import static org.junit.Assert.*;

import org.junit.Test;

import com.dhemery.mack.adapters.ImageKey;
import com.dhemery.mack.model.Folder;
import com.dhemery.mack.model.Node;
import com.dhemery.mack.model.Page;
import com.dhemery.mack.model.Project;
import com.dhemery.mack.model.Session;

public class ImageKeyTests {

	@Test
	public void pageKey() {
		assertEquals(ImageKey.PAGE, ImageKey.getImageKey(new Page()));
	}

	@Test
	public void folderKey() {
		assertEquals(ImageKey.FOLDER, ImageKey.getImageKey(new Folder()));
	}

	@Test
	public void projectKey() {
		assertEquals(ImageKey.PROJECT, ImageKey.getImageKey(new Project()));
	}

	@Test
	public void sessionKey() {
		assertEquals(ImageKey.SESSION, ImageKey.getImageKey(new Session()));
	}

	@Test
	public void noNodeKey() {
		assertNull(ImageKey.getImageKey(new Node(null)));
	}
}
